package com.ahuan.resp;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class LoginRes {

    private boolean  success;
    private String msg;
    private Object data;
    private String token;

    public static LoginRes codeError(){
        return new LoginRes(false,"登录失败，验证码错误",null,null);
    }

    public static LoginRes loginFail(){
        return new LoginRes(false,"登录失败，账号或密码错误！",null,null);
    }

    public static LoginRes loginSuccess(Object data,String token){
        return new LoginRes(true,"登录成功！",data,token);
    }
}
